<?php

namespace app\admin\validate\user;

use think\Validate;

class User extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
        'password|密码' => 'require|length:6,18|alphaDash',
        'mobile|手机号码' => 'mobile',
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [];

    /**
     * 场景验证
     * @var []
     */
    protected $scene = [
        'index' => ['mobile'],
        'update' => ['password']
    ];
}
